from zope.interface import Interface
from plone.theme.interfaces import IDefaultPloneLayer

class IRedominoExternalEditor(IDefaultPloneLayer):
    "Marker interface that defines a Zope 3 browser layer"

class IExternalEditorAvailable(Interface):
    """ Check for current object is externally editable """

    def available():
        """ Return True or False if the current object is externally editable """



class IExtEditAppInfo(Interface):
    """Browser view providing
       methods needed by external edit applet
       about its context"""
    def checkModificationDate():
        """Returns the modification date of the context """
    def checkEditPermission():
        """Checks if the current user has edit permission on the context"""
    def doUnlock():
        """Unlocks the context"""
    def doLock():
        """Locks the context"""
    def checkLock():
        """ Returs 0 if the context is not locked or locked by current user
            Returns 1#### + the username otherwise"""
